<?php
/**
 * Created by PhpStorm.
 * User: work
 * Date: 18-8-4
 * Time: 下午6:03
 */

namespace PddWechat\Models\User\Data;


use Dai\Framework\Library\Log;
use PddWechat\Models\User\Dao\UserInviteRecordDao;
use PddWechat\Models\User\DataObject\UserInviteRecordDo;

class UserInviteRecordData
{
    public function __construct()
    {
        $this->userInviteRecordDao = new UserInviteRecordDao();
    }

    public function insertRecord($openId, $inviteOpenId, $status){
        $userInviteRecordDo = new UserInviteRecordDo();
        $userInviteRecordDo->openId = $openId;
        $userInviteRecordDo->inviteOpenId = $inviteOpenId;
        $userInviteRecordDo->status =$status;
        $this->insert($userInviteRecordDo);
    }

    public function insert(UserInviteRecordDo $userInviteRecordDo)
    {
        return $this->userInviteRecordDao->insert($userInviteRecordDo);
    }

    public function selectOpenIdInviteRecords(string $inviteOpenId)
    {
        return $this->userInviteRecordDao->selectOpenIdInviteRecords($inviteOpenId);
    }

}